﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    // Description:	Writes the specified StringBuilder to the file using the specified path. If the file already exists, it is overwritten.
    /*
        new StringBuilder("Hello World!!!").CopyToFile(@"c:\helloworld.txt");
     */

    public static partial class StringbuilderExtensions
    {
        public static void CopyToFile(this StringBuilder sBuilder, string path)
        {
            File.WriteAllText(path, sBuilder.ToString());
        }
    }
}
